// components/circleBack/circleBack.js
const app = getApp()

Component({

  /**
   * 组件的属性列表
   */
  properties: {
    customChange:{
      type:Boolean,
      value:false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    statusBarHeight: app.globalData.statusBarHeight,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    backClick() {
      if (!this.properties.customChange) {
        wx.navigateBack({
          delta: 1,
          fail: res => {
            wx.switchTab({
              url: '/pages/index/index',
            })
          }
        })
      }else{
        console.log('customChange');
        this.triggerEvent('customChange')
      }
    },
  }
})